package com.mostromas.ess.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 库存明细表
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "StockDetailed对象",description = "库存明细表")
@TableName("mr_stock_detailed") // mr_composition
@Data
public class StockDetailed extends ProductBasics implements Serializable {
    private static final long serialVersionUID = -2185725813984020360L;

    /**
     * 主键，分布式ID
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "商品类别ID")
    private String categoryId;

    @ApiModelProperty(value = "款式ID")
    private String productId;

    @ApiModelProperty(value = "颜色ID")
    private String colorId;

    @ApiModelProperty(value = "尺码ID")
    private String sizeId;

    @ApiModelProperty(value = "所在仓库ID")
    private String warehouseId;

    @ApiModelProperty(value = "库存数量")
    private Integer number;

    @TableField(exist = false)
    @ApiModelProperty(value = "仓库详情")
    private Warehouse warehouse;
}
